Training data generating device, method, and program, and crowd state recognition device, method, and program

ABSTRACT

At least one processor generates a crowd state image as an image in which a person image corresponding to a person state is synthesized with previously-prepared image at a predetermined size. The at least one processor specifies a training label for the crowd state image. The at least one processor outputs a pair of crowd state image and training label.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.17/379,392 filed on Jul. 19, 2021, which is a divisional of U.S. patentapplication Ser. No. 16/689,406, filed on Nov. 20, 2019, which has beenissued as U.S. Pat. No. 11,132,587, which is a divisional of U.S. patentapplication Ser. No. 16/209,290, filed on Dec. 4, 2018, which has beenissued as U.S. Pat. No. 10,515,294, which is a divisional of U.S. patentapplication Ser. No. 15/667,937, filed on Aug. 3, 2017, which has beenissued as U.S. Pat. No. 10,223,620, which is a divisional of U.S. patentapplication Ser. No. 14/899,340, filed on Dec. 17, 2015, which has beenissued as U.S. Pat. No. 9,875,431, which is a national stage applicationof International Application No. PCT/JP2014/002670, filed on May 21,2014, which claims priority to Japanese Patent Application No.2013-135915, filed on Jun. 28, 2013, the disclosures of each which arehereby incorporated by reference in their entirety.

TECHNICAL FIELD

The present invention relates to a training data generating device forgenerating training data, a training data generating method, and atraining data generating program as well as a crowd state recognitiondevice for recognizing a state of a crowd in an image, a crowd staterecognition method, and a crowd state recognition program.

BACKGROUND ART

Various techniques for recognizing a state of a crowd (which will bedenoted as crowd state below) in an image are proposed (see PTLs 1 to3).

A person behavior determination device described in PTL 1 extracts achanged region in which a difference is caused by backgrounddifferencing or the like from a video, and calculates the characteristicamount from the changed region. The person behavior determination devicethen determines whether the changed region is a person region by use ofa person discriminator machine-learning the characteristic amount,thereby detecting the person region. Further, the person behaviordetermination device associates the detected person region betweenframes in consideration of distance or color histogram, and tracks theperson region over a predetermined number of frames. The person behaviordetermination device then calculates the characteristic amount of aperson trajectory such as average speed, tracking time and motiondirection from the person trajectory acquired by the tracking, anddetermines a person behavior based on the characteristic amount of theperson trajectory.

A headcount counting device described in PTL 2 counts the number ofpersons from a video shooting a crowd therein. The headcount countingdevice extracts the heads of persons included in the image based on headmodels. The headcount counting device then links the head positionsdetermined as the same person between frames by use of thecharacteristic amount such as position information or colordistribution, and counts the number of persons from the linking result(person tracking result).

A system described in PTL 3 detects a state such as steady (main streamof persons, for example)/non-steady (against main stream, for example).The system aggregates optical flow attributes for a determination blockas a determination unit, and calculates an evaluation value forevaluating a degree of steadiness of optical flow. The system thendetermines a state of the determination block from the evaluation value.

CITATION LIST Patent Literatures

-   PTL 1: Japanese Patent Application Laid-Open No. 2011-100175    (paragraphs 0028 to-   PTL 2: Japanese Patent Application Laid-Open No. 2010-198566    (paragraphs 0046 to-   PTL 3: Japanese Patent Application Laid-Open No. 2012-22370    (Paragraph 0009)

SUMMARY OF INVENTION Technical Problem

With the techniques described in PTLs 1 to 3, a determinationperformance lowers for a video at a low frame rate. In particular, withthe techniques described in PTL 1 to 3, a crowd state in an image cannotbe determined for a still image.

This is because the techniques described in PTLs 1 to 3 use each framein a video and a state determination performance depends on an intervalbetween frames. For example, with the technique described in PTL 1,person regions are associated between frames thereby to acquire a persontrajectory. Further, with the technique described in PTL 2, the headpositions are linked between frames and the result thereof is assumed asa person tracking result. When such a trajectory or tracking result isacquired, the person regions or head positions need to be associatedbetween frames. At this time, the motion amount of a person is larger ata lower frame rate, and accordingly a change in the person region or thehead position or a change in shape (posture) increases. Further,influences due to disturbance of illumination or the like also increase.Therefore, the person regions or the head positions are difficult toassociate between frames. Consequently, an accuracy of person trajectoryor the like lowers and an accuracy of determining a crowd state in animage lowers. Furthermore, also with the technique described in PTL 3,an optical flow is difficult to correctly find at a low frame rate, andconsequently an accuracy of aggregated attributes lowers and a statedetermination performance lowers.

For example, there is assumed a method using a discriminator with alearned dictionary in order to recognize a crowd state in an image. Thedictionary is learned by training data such as images indicating crowdstates. However, a large amount of training data (learning data) usedfor learning a dictionary needs to be collected. For example,arrangement of person (overlap between persons or deviation of personpositions), direction of person, and density (persons per unit region)need to be defined in various states, and a large number of images inwhich shooting angle, background, illumination, clothes or posture ofperson, and the like are variously changed in each state need to becollected. Machine learning is performed by use of the images so that adictionary of the discriminator is acquired. However, working loads forcollecting training data increase when collecting a large amount of suchtraining data.

It is therefore an object of the present invention to provide a trainingdata generating device capable of easily generating a large amount oftraining data used for machine-learning a dictionary of a discriminatorfor recognizing a crowd state, a training data generating method, and atraining data generating program.

It is another object of the present invention to provide a crowd staterecognition device capable of preferably recognizing a crowd state in animage irrespective of a frame rate, a crowd state recognition method,and a crowd state recognition program.

Solution to Problem

A training data generating device according to the present inventionincludes: at least one processor configured to: generate a crowd stateimage as an image in which a person image corresponding to a personstate is synthesized with previously-prepared image at a predeterminedsize; specify a training label for the crowd state image; and output apair of crowd state image and training label.

Advantageous Effects of Invention

With the training data generating device, the training data generatingmethod, and training data generating program according to the presentinvention, it is possible to easily generate a large amount of trainingdata used for machine-learning a dictionary of a discriminator forrecognizing a crowd state.

With the crowd state recognition device, the crowd state recognitionmethod, and the crowd state recognition program according to the presentinvention, it is possible to preferably recognize a crowd state in animage irrespective of a frame rate.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 It depicts a block diagram illustrating an exemplary structure ofa training data generating device according to the present invention.

FIG. 2 It depicts a schematic diagram illustrating exemplary informationstored in a crowd state control designation storage means.

FIG. 3 It depicts a schematic diagram illustrating exemplary informationstored in a person state control designation storage means.

FIG. 4 It depicts a diagram illustrating person images stored in aperson image storage means and person region images corresponding to theperson images by way of example.

FIG. 5 It depicts schematic diagrams illustrating examples meeting acondition of a background person state.

FIG. 6 It depicts schematic diagrams illustrating examples meeting acondition of a foreground person state.

FIG. 7 It depicts a block diagram illustrating an exemplary structure ofa crowd state recognition device according to the present invention.

FIG. 8 It depicts a schematic diagram illustrating how to recognize adegree of congestion (the number of persons) by way of example.

FIG. 9 It depicts a schematic diagram illustrating how to recognize adirection of a crowd by way of example.

FIG. 10 It depicts a schematic diagram illustrating how to recognize anon-abnormal crowd or an abnormal crowd by way of example.

FIG. 11 It depicts a schematic diagram illustrating how to recognize adisordered state or an ordered state by way of example.

FIG. 12 It depicts a flowchart illustrating an exemplary processingprogress of the training data generating device.

FIG. 13 It depicts a flowchart illustrating an exemplary processingprogress of step S1.

FIG. 14 It depicts a flowchart illustrating an exemplary processingprogress of step S2.

FIG. 15 It depicts a flowchart illustrating an exemplary processingprogress of step S3.

FIG. 16 It depicts a flowchart illustrating an exemplary processingprogress of step S4.

FIG. 17 It depicts a flowchart illustrating an exemplary processingprogress of the crowd state recognition device.

FIG. 18 It depicts a block diagram illustrating a specific structure ofthe training data generating device according to the present inventionby way of example.

FIG. 19 It depicts a block diagram illustrating a specific structure ofthe crowd state recognition device according to the present invention byway of example.

FIG. 20 It depicts a block diagram illustrating main parts in thetraining data generating device according to the present invention.

FIG. 21 It depicts a block diagram illustrating main parts in the crowdstate recognition device according to the present invention.

DESCRIPTION OF EMBODIMENTS

An exemplary embodiment according to the present invention will bedescribed below with reference to the drawings.

FIG. 1 is a block diagram illustrating an exemplary structure of atraining data generating device according to the present invention. Atraining data generating device 10 according to the present inventiongenerates training data for machine-learning a crowd state in an image.Specifically, the training data generating device 10 creates a pluralityof pairs of local image of a crowd state and training labelcorresponding to the local image. Herein, “local” indicates beingsmaller than a region of an image (image acquired by an imageacquisition device 3 (see FIG. 7 ) described below) to be recognized fora crowd state. Then, a local image of a crowd state denotes a collectionof basic sites (which will be denoted as reference sites below) ofpersons configuring a crowd in such a region. According to the presentexemplary embodiment, the description will be made assuming that thehead is used as a reference site, but other than the head may be used asa reference site. A local image of a crowd state will be denoted ascrowd patch. A crowd patch may indicate therein sites of a person otherthan the reference site (the head in the present example).

The training data generating device 10 includes a data processing device1 operating under program control, and a storage device 2 for storinginformation therein.

The storage device 2 includes a background image storage means 21, alearning local image information storage means 22, a crowd state controldesignation storage means 23, a person state control designation storagemeans 24, a person image storage means 25, and a person region imagestorage means 26.

The background image storage means 21 stores a plurality of backgroundimages (a group of background images) used as the background in a crowdpatch. The background image does not include a person. An image of anactual place where an image to be recognized for a crowd state is shotmay be used as a background image. A background image generated by useof CG (Computer Graphics) or the like may be used.

The learning local image information storage means 22 stores a size of acrowd patch (local image of a crowd state used for machine learning),and a size of the reference site of a person for the crowd patch. Forexample, a size of a crowd patch is assumed at h pixels in height and wpixels in width. A height size of the reference site (the head in thepresent example) of a person configuring a crowd shot in the crowd patchis assumed at 1/α times of the height size of the crowd patch, or at h/αpixels. In this case, h pixels in height and w pixels in width arestored as the size of the crowd patch in the learning local imageinformation storage means 22. h/α pixels in height is stored as the sizeof the reference site of a person in the learning local imageinformation storage means 22. There is assumed herein the example inwhich the height size is stored as the size of the reference site, butthe size of the reference site to be stored is not limited to the heightsize. For example, it is assumed that a width size of the reference siteof a person is defined at 1/α times of the width size of the crowd patchor w/α pixels. In this case, h pixels in height and w pixels in widthare stored as the size of the crowd patch in the learning local imageinformation storage means 22, and w/α pixels in width may be stored asthe size of the reference site of a person in the learning local imageinformation storage means 22. In actual use, a size of the referencesite of a person may employ either the height size or the width size. Arelationship between the size of the crowd patch and the size of thereference site of a person has only to be known, and a diagonal size orthe like may be used.

Herein, the size of the reference site of a person is a size by which aperson whose reference site is shot as large as the size in a crowdpatch is identified as a human being. For example, when the referencesite of a person is shot to be remarkably large in a crowd patch or shotto be remarkably small, the person configures the crowd but is simplyregarded as background.

The crowd state control designation storage means 23 stores designationinformation on person states for people (which will be denoted as peoplestate control designation below) when synthesizing a plurality of personimages in a crowd patch. The people state control designation ispreviously defined by an operator of the training data generating device10 and is stored in the crowd state control designation storage means23. The people state control designation is defined per item such asitem “arrangement of person” for a people arrangement relationship suchas overlapped persons or positional deviation when synthesizing aplurality of person images, item “direction of person” on orientationsof persons, or item “number of persons” for the number of persons ordensity. Items with the defined people state control designation are notlimited thereto. FIG. 2 is a schematic diagram illustrating exemplaryinformation stored in the crowd state control designation storage means23. FIG. 2 illustrates the people state control designation defined for“arrangement of person,” “direction of person,” and “number of persons.”

The forms of the people state control designation include “predeterminedstate,” “random,” and “predetermined rule.”

“Predetermined state” is a designated form to designate a specific statefor a corresponding item. In the example illustrated in FIG. 2 , “threepersons” defined for the item “number of persons” corresponds to“predetermined state.” In this example, “number of persons” isspecifically designated as “three persons.” As other example of“predetermined state,” “all people in right direction” may be designatedfor the item “direction of person,” for example.

“Random” indicates that a state may be arbitrarily defined for acorresponding item. In the example illustrated in FIG. 2 , the peoplestate control designation “random” is defined for “arrangement ofperson” and “direction of person.”

“Predetermined rule” is a designation form indicating that a state for acorresponding item may be defined within a range meeting anoperator-designated rule. For example, when a rule that “persons arearranged in overlap of 50%” is defined for the item “arrangement ofperson,” the arrangement of person is designated to define at least astate of persons meeting the rule. For example, when a rule that“persons arranged on the right side relative to the center of a crowdpatch face rightward and persons arranged on the left side relative tothe center face leftward” is defined for “direction of person,” thedirection of person is designated to define at least a state of personsmeeting the rule.

The crowd state control designation storage means 23 stores the presenceof a designated training label per item. In the example illustrated inFIG. 2 , “◯” indicates information on the presence of a designatedtraining label and “x” indicates information on the absence of adesignated training label. This point is the same as in FIG. 3 describedlater.

The operator selects one or more items with a designated training labelfrom among the items with the defined people state control designation.Further, the operator defines the people state control designation foreach item irrespective of whether an item is to be designated with atraining label. In the example illustrated in FIG. 2 , the people statecontrol designation (the designation of random in this example) isdefined for the items “arrangement of person” and “direction of person”without a designated training label. The operator assumes a form of thepeople state control designation as “predetermined state” for items witha designated training label. In the example illustrated in FIG. 2 , aspecific state of “three persons” is designated for the item “number ofpersons” with a designated training label. The crowd state controldesignation storage means 23 stores therein the people state controldesignation and the presence of a designated training label defined bythe operator per item.

FIG. 2 illustrates the items “arrangement of person,” “direction ofperson,” and “number of persons” by way of example, but items for whichthe operator defines the people state control designation and thepresence of a designated training label are not limited thereto.According to the present exemplary embodiment, the description will bemade assuming that the crowd state control designation storage means 23stores therein the people state control designation and the presence ofa designated training label defined by the operator for at least theitems “arrangement of person,” “direction of person,” and “number ofpersons.”

The person state control designation storage means 24 stores informationto designate a state of each person (which will be denoted as individualperson state control designation below) when a plurality of personimages are synthesized within a crowd patch. While the “people statecontrol designation” designates a person state for people, the“individual person state control designation” designates a state of anindividual person belonging to a group of persons. The individual personstate control designation is previously defined by the operator of thetraining data generating device 10, and is stored in the person statecontrol designation storage means 24. The individual person statecontrol designation is defined per item such as “shooting angle ofperson,” “illumination to person,” “posture of person,” “clothes ofperson,” “body shape of person,” “hairstyle of person” or “person sizewhen synthesized with crowd patch.” Items with the defined individualperson state control designation are not limited to the items. FIG. 3 isa schematic diagram illustrating exemplary information stored in theperson state control designation storage means 24. FIG. 3 illustratesthe individual person state control designation defined for the items“shooting angle of person,” “illumination to person,” and “posture ofperson.”

The forms of the individual person state control designation are“predetermined state,” “random,” and “predetermined rule” similarly tothe people state control designation.

As described for the people state control designation, “predeterminedstate” is a designation form to designate a specific state for acorresponding item. In the example illustrated in FIG. 3 , “walking”defined for the item “posture of person” corresponds to “predeterminedstate.” In this example, “posture of person” is specifically designatedas walking posture.

As described for the people state control designation, “random”indicates that a state may be arbitrarily defined for a correspondingitem. In the example illustrated in FIG. 3 , the individual person statecontrol designation “random” is defined for “illumination to person.”

As described for the people state control designation, “predeterminedrule” is a designation form for designating to define a state of acorresponding item within a range meeting an operator-designated rule.In the example illustrated in FIG. 3 , the predetermined rule is definedfor “shooting angle of person.” In this example, it is designated tocalculate a shooting angle of a person and to define a person statedepending on the shooting angle by use of an equation based on thecamera parameters from the person arrangement on synthesis. For example,when a rule that “a person size on synthesis is determined based on aperson arrangement on synthesis and the size of the reference sitestored in the learning local image information storage means 22” isdefined for “person size when synthesized with crowd patch,” a size ofthe person is to be defined so as to meet at least the rule.

The person state control designation storage means 24 also stores thepresence of a designated training label per item.

The operator may select one or more items with a designated traininglabel for not only the items with the defined people state controldesignation but also the items with the defined individual person statecontrol designation. Also in this case, the operator defines theindividual person state control designation for each item irrespectiveof whether an item is to be designated with a training label. In theexample illustrated in FIG. 3 , the individual person state controldesignation is defined for the items “shooting angle of person” and“illumination to person” without a designated training label. Theoperator assumes a form of the individual person state controldesignation as “predetermined state” for an item with a designatedtraining label. In the example illustrated in FIG. 3 , the items“posture of person” with a designated training label is specificallydesignated as a state of walking. The person state control designationstorage means 24 stores therein the individual person state controldesignations and the presence of a designated training label defined bythe user per item.

The operator may not designate a training label for all the items withthe defined individual person state control designation. As describedabove, the operator defines one or more items as items with a designatedtraining label for the items with the defined people state controldesignation.

According to the present exemplary embodiment, the description will bemade assuming that the person state control designation storage means 24stores the operator-defined individual person state control designationand the presence of a designated training label for at least the items“shooting angle of person,” “illumination to person,” “posture ofperson,” “clothes of person,” “body shape of person, “hairstyle ofperson,” and “person size when synthesized with crowd patch.”

The contents of the people state control designation defined for an itemwith a designated training label are a training label corresponding to acrowd patch generated according to the information stored in the crowdstate control designation storage means 23. Similarly, the contents ofthe individual person state control designation defined for an item witha designated training label are a training label corresponding to acrowd patch generated according to the information stored in the personstate control designation storage means 24. The training label based onthe people state control designation is a main training label, and thetraining label based on the individual person state control designationis a supplementary training label for the training label.

Specifically, the data processing device 1 (see FIG. 1 ) determinesperson states, and generates a crowd patch in which the persons aresynthesized according to the people state control designation of eachitem stored in the crowd state control designation storage means 23 andthe individual person state control designation of each item stored inthe person state control designation storage means 24. The dataprocessing device 1 defines the contents of the people state controldesignation and the individual person state control designation definedfor an item with a designated training label as a training label for thecrowd patch. For example, it is assumed that the data processing device1 generates a crowd patch according to the people state controldesignation and the individual person state control designationillustrated in FIG. 2 and FIG. 3 . In this case, three walking personsare shot in the crowd patch. The data processing device 1 defines atraining label of “three persons, walking” as the training label for thecrowd patch.

The item “person size when synthesized with crowd patch” is to be storedin the person state control designation storage means 24. When a personidentified as a human being is synthesized in a crowd patch, the size ofthe reference site of a person stored in the learning local imageinformation storage means 22 may be designated or random may bedesignated as the individual person state control designation of “personsize when synthesized with crowd patch,” for example. As a result of thedesignation of random, if a person state is temporarily determined atthe size of the reference site largely different from the size of thereference site of a person stored in the learning local imageinformation storage means 22, the temporary determination of a personstate may be made again. When a person to be the background issynthesized in a crowd patch, a size largely different from the size ofthe reference site of a person stored in the learning local imageinformation storage means 22 may be designated or random may bedesignated as the individual person state control designation of “personsize when synthesized with crowd patch,” for example. As a result of thedesignation of random, if a state of a person not corresponding to thebackground is temporarily determined, the temporary determination of aperson state may be made again.

As described below, according to the present exemplary embodiment, thedata processing device 1 determines a state of a person to be identifiedas a human being (which may be denoted as foreground person below) anddetermines a state of a background person. The people state controldesignation and the individual person state control designation fordetermining a foreground person state as well as the people statecontrol designation and the individual person state control designationfor determining a background person state may be separately defined bythe operator. In this case, the crowd state control designation storagemeans 23 stores therein the people state control designation fordetermining a foreground person state and the people state controldesignation for determining a background person state. The person statecontrol designation storage means 24 stores therein the individualperson state control designation for determining a foreground personstate and the individual person state control designation fordetermining a background person state. The people state controldesignation and the individual person state control designation may notbe divided for determining a foreground person state and for determininga background person state.

The person image storage means 25 stores a plurality of person images (agroup of person images) added with information on person states such asdirection of person, shooting angle of person, illumination to person,posture of person, clothes, body shape and hairstyle for person image.That is, the data processing device 1 can read a person image matchingwith the determined state from the person image storage means 25.

The person region image storage means 26 stores a group of person regionimages corresponding to the group of person images stored in the personimage storage means 25. A person region image is an image indicating theregion of a person in a person image stored in the person image storagemeans 25. FIG. 4 is a diagram illustrating person images stored in theperson image storage means 25 and person region images corresponding tothe person images by way of example. FIG. 4 illustrates four pairs ofperson image and person region image by way of example. A person regionimage may be an image in which the region of a person shot in a personimage is expressed in a single color (white in the example illustratedin FIG. 4 ) and the region of other than the person is expressed inanother single color (black in the example illustrated in FIG. 4 ). Aperson region image is not limited to the example. A person region imagemay be an image capable of specifying the region of a person in a personimage.

A person region image is used for cropping only a person (or croppingonly the region of a person) from a corresponding person image.

There may be configured not such that a group of various person imagesis previously prepared and stored in the person image storage means 25but such that the data processing device 1 includes a person imagegeneration means (not illustrated) for generating a person imagematching with a determined person state by CG or the like.

The data processing device 1 includes a background extraction means 11,a person state determination means 15, a crowd state image synthesismeans 14 and a control means 16.

The background extraction means 11 selects a background image from thegroup of background images stored in the background image storage means21. The background extraction means 11 calculates an aspect ratio of thecrowd patch size stored in the learning local image information storagemeans 22. The background extraction means 11 temporarily extracts abackground at a proper position and a proper size to meet the aspectratio from the selected background image. Further, the backgroundextraction means 11 enlarges or downsizes the temporarily-extractedbackground to match with the crowd patch size stored in the learninglocal image information storage means 22. In this way, to enlarge ordownsize a region extracted from an image to match with a crowd patchsize may be denoted as to normalize.

When the background extraction means 11 temporarily extracts abackground at a proper position and a proper size, a region at a randomposition and a random size may be extracted to meet the aspect ratio.Assuming that the size of the reference site of a person at eachposition in the image is known, the background extraction means 11 mayfind a size of the crowd patch enlarged or downsized at an enlargementrate or downsizing rate at which the size of the reference site of aperson stored in the learning local image information storage means 22is enlarged or downsized according to the size of the reference siteknown at each position in the image. The background extraction means 11may then extract a region with the size found for a position in theimage. The method with which the background extraction means 11temporarily extracts a region from a selected background image may beother method.

The person state determination means 15 determines a final person statebased on the conditions for the size of the reference site of a personfor the crowd patch size and how the reference site is expressed whiletemporarily determining a person state based on the people state controldesignation stored in the crowd state control designation storage means23 and the individual person state control designation stored in theperson state control designation storage means 24.

Herein, when a person state meeting the people state control designationand the individual person state control designation is determined, thedesignation “random” may be possible in the designations, and thus aproper person state may not be acquired. In this case, a person statemeeting the people state control designation and the individual personstate control designation is determined again. When a proper personstate is acquired, the person state is finally determined. In this way,a person state may be determined again, and thus the expression“temporary determination” may be used.

According to the present exemplary embodiment, the person statedetermination means determines a foreground person state and determinesa background person state. At this time, when determining whether atemporarily-determined foreground person state is proper, the personstate determination means 15 makes the determination based on whether asize of the reference site comparable with the size of the referencesite of a person for the crowd patch size is acquired or how thereference site is expressed. When determining whether atemporarily-determined background person state is proper, the personstate determination means 15 makes the determination based on whether asize of the reference site largely different from the size of thereference site of a person for the crowd patch size is acquired or howthe reference site is expressed.

The person state determination means 15 will be described below in moredetail. The person state determination means 15 includes a backgroundperson state determination means 12 and a foreground person statedetermination means 13.

The background person state determination means 12 defines arrangementof person, direction of person, number of persons, shooting angle ofperson, illumination to person, posture of person, clothes of person,body shape of person, hairstyle of person, person size when synthesizedwith crowd patch, and the like, and temporarily determines a state of aperson corresponding to the background according to the people statecontrol designation stored in the crowd state control designationstorage means 23 and the individual person state control designationstored in the person state control designation storage means 24. Thebackground person state determination means 12 determines whether thetemporarily-determined person state meets the condition of thebackground person state, and if the condition of the background personstate is not met, makes the temporary determination of the person stateagain. If the temporarily-determined person state meets the condition,the background person state determination means 12 finally determinesthe temporarily-determined person state as the state of the personcorresponding to the background.

The condition of the background person state corresponds to the factthat a person is arranged such that the reference site of the person isnot within a crowd patch or the fact that a size of the reference siteof a person when synthesized is remarkably larger than the size of thereference site stored in the learning local image information storagemeans 22, or remarkably smaller than that, for example. Under thecondition, a state of a person corresponding to the background isfinally determined based on the size of the reference site of the personrelative to the crowd patch size or how the reference site is expressed.The conditions listed herein are exemplary, and other conditions may beemployed for the conditions of the background person state.

The fact that the reference site of a person is within a crowd patchindicates a state in which more than a predetermined rate of the regionexpressing the reference site of the person therein is shot in a crowdpatch. Conversely, the fact that the reference site of a person is notwithin a crowd patch indicates a state in which less than apredetermined rate of the region expressing the reference site of theperson therein is shot within a crowd patch. For example, it is assumedthat the predetermined rate is previously defined at 80%. In this case,for example, if 85% of the region expressing the reference site is shotwithin a crowd patch, it can be said that the reference site of theperson is within a crowd patch. For example, if only 20% of the regionexpressing the reference site is shot in a crowd patch, it can be saidthat the reference site of the person is not within a crowd patch. 80%is an exemplary rate, and a value other than 80% may be defined as thepredetermined rate.

According to the present exemplary embodiment, a first thresholdindicating a size larger than the size of the reference site stored inthe learning local image information storage means 22 and a secondthreshold indicating a size smaller than the size of the reference sitestored in the learning local image information storage means 22 arepreviously defined. The fact that the size of the reference site of aperson when synthesized is as large as the size of the reference sitestored in the learning local image information storage means 22indicates that the size of the reference site of a person whensynthesized is equal to or larger than the second threshold, and equalto or less than the first threshold. The fact that the size of thereference site of a person when synthesized is much larger than the sizeof the reference site stored in the learning local image informationstorage means 22 indicates that the size of the reference site of aperson when synthesized is larger than the first threshold. The factthat the size of the reference site of a person when synthesized is muchsmaller than the size of the reference site stored in the learning localimage information storage means 22 indicates that the size of thereference site of a person when synthesized is less than the secondthreshold.

FIGS. 5(a) to 5(d) are the schematic diagrams illustrating the examplesin which the condition of the background person state is met. In thisexample, it is assumed that the height size of the reference site (thehead in this example) of a person is stored as 1/α times of the heightsize of h pixels of a crowd patch (or h/α pixels) in the learning localimage information storage means 22. The person states illustrated inFIGS. 5(a) and 5(b) are in an arrangement state in which the referencesite of the person is not found in the crowd patch, and thus thecondition of the background person state is met. The person stateillustrated in FIG. 5(c) is that the size of the reference site is muchsmaller than the defined size of the reference site, and thus thecondition of the background person state is met. The person stateillustrated in FIG. 5(d) is that the size of the reference site is muchlarger than the defined size of the reference site, and thus thecondition of the background person state is met.

The foreground person state determination means 13 defines arrangementof person, direction of person, number of persons, shooting angle ofperson, illumination to person, posture of person, clothes of person,body shape of person, hairstyle of person, person size when synthesizedwith crowd patch, and the like, and temporarily determines a state of aperson corresponding to the foreground according to the people statecontrol designation stored in the crowd state control designationstorage means 23 and the individual person state control designationstored in the person state control designation storage means 24. Theforeground person state determination means 13 then determines whetherthe temporarily-determined person state meets the condition of theforeground person state, and if the condition of the foreground personstate is not met, makes the temporary determination of the person stateagain. Further, if the temporarily-determined person state meets thecondition, the foreground person state determination means 13 finallydetermines the temporarily-determined person state as the state of theperson corresponding to the foreground.

The condition of the foreground person state is, for example, that thereference site of a person is arranged to be within a crowd patch andthe size of the reference site of a person when synthesized is as largeas the size of the reference site stored in the learning local imageinformation storage means 22. Under the condition, a state of the personcorresponding to the foreground is finally determined based on the sizeof the reference site of the person relative to the crowd patch size orhow the reference site is expressed. The conditions listed herein areexemplary, and other conditions may be employed as the condition of theforeground person state.

FIGS. 6(a) to 6(d) are the schematic diagrams illustrating the examplesin which the condition of the foreground person state is met. Asdescribed with reference to FIGS. 5(a) to 5(d), the height size of thereference site (the head in this example) of a person is assumed as 1/αtimes of the height size of h pixels of a crowd patch (or h/α pixels) inthe learning local image information storage means 22. Any person stateillustrated in FIGS. 6(a) to 6(d) is such that the reference site of theperson is within the crowd patch and the size of the reference site isas large as the size of the reference site stored in the learning localimage information storage means 22. Therefore, any person stateillustrated in FIGS. 6(a) to 6(d) meets the condition of the foregroundperson state.

As described above, the people state control designation and theindividual person state control designation for determining a foregroundperson state and the people state control designation and the individualperson state control designation for determining a background personstate may be separately defined by the operator. In this case, thebackground person state determination means 12 may temporarily determinea person state according to the people state control designation and theindividual person state control designation for determining a backgroundperson state. The foreground person state determination means 13 maythen temporarily determine a person state according to the people statecontrol designation and the individual person state control designationfor determining a foreground person state. As described above, when thepeople state control designation and the individual person state controldesignation are separately defined for determining a foreground personstate and for determining a background person state, the number offoreground persons and the number of background persons can be changed.

The crowd state image synthesis means 14 reads a person image meetingthe person state (such as direction of person, number of persons,shooting angle of person, illumination to person, posture of person,clothes of person, body shape of person, and hairstyle of person)finally determined by the background person state determination means 12from the person image storage means 25, and further reads a personregion image corresponding to the person image from the person regionimage storage means 26. The crowd state image synthesis means 14 thencrops the image of only the person from the person image by use of theperson region image (or crops only the person region). Similarly, thecrowd state image synthesis means 14 reads a person image meeting theperson state finally determined by the foreground person statedetermination means 13 from the person image storage means 25, andfurther reads a person region image corresponding to the person imagefrom the person region image storage means 26. The crowd state imagesynthesis means 14 then crops the image of only the person from theperson image by use of the person region image.

The crowd state image synthesis means 14 synthesizes the image of onlythe person cropped as described above with the background image. At thistime, the crowd state image synthesis means 14 synthesizes the image ofonly the person cropped based on the person state finally determined bythe background person state determination means 12 with the backgroundimage according to “arrangement of person” and “person size whensynthesized with crowd patch” determined by the background person statedetermination means 12. Further, the crowd state image synthesis means14 synthesizes the image of only the person cropped based on the personstate finally determined by the foreground person state determinationmeans 13 with the background image according to “arrangement of person”and “person size when synthesized with crowd patch” determined by theforeground person state determination means 13. Herein, the backgroundimage is an image normalized by the background extraction means 11. Thesynthesis result is a crowd patch.

When synthesizing the images of only persons with the background image,the crowd state image synthesis means 14 sequentially overlaps andsynthesizes the images from the image of a person corresponding to thefarthest arrangement position from the camera. For example, when theupper part of the image is farther from the camera, the crowd stateimage synthesis means 14 sequentially overlaps and synthesizes from theimage of the person at the upper part of the screen. When information oncamera calibration is given, the crowd state image synthesis means 14overlaps and synthesizes the images of persons from the farthest imagefrom the camera in consideration of the 3D positions of the images ofpersons.

The above example has been described assuming that the crowd state imagesynthesis means 14 crops the image of only a person from a person imageby use of a person region image and synthesizes the image of only aperson with the background image. The crowd state image synthesis means14 may divide a person image read from the person image storage means 25into the region of a person and the region of other than the personbased on a person region image corresponding to the person image, mayweight the region of the person and the region of other than the person,and may blend and synthesize the person image based on the weights. Inthis case, the weight on the region of the person is heavier than theregion of other than the person. The weights may be changed in theregions.

As described above, the data processing device 1 may include the personimage generation means (not illustrated) for generating a person imagematching with a designated person state by CG or the like. In this case,the person image generation means (not illustrated) generates a personimage matching with a person state determined by the background personstate determination means 12 or a person state determined by theforeground person state determination means 13, and the crowd stateimage synthesis means 14 may synthesize the person image thereby togenerate a crowd patch.

The crowd state image synthesis means 14 reads training labels from thecrowd state control designation storage means 23 and the person statecontrol designation storage means 24 when generating a crowd patch. Thatis, the crowd state image synthesis means 14 reads the contents of thepeople state control designation of an item with a designated traininglabel from the crowd state control designation storage means 23, andreads the contents of the individual person state control designation ofan item with a designated training label from the person state controldesignation storage means 24. The crowd state image synthesis means 14then outputs a pair of crowd path and training label. The crowd patchand the training label are used as training data of machine learning forrecognizing a crowd state in the image.

The control means 16 causes the background extraction means 11, theperson state determination means 15 (specifically, the background personstate determination means 12 and the foreground person statedetermination means 13) and the crowd state image synthesis means 14 torepeatedly perform a series of processings. Consequently, the dataprocessing device 1 outputs a large number of pairs of crowd patch andtraining label.

When changing the person state designation or the training label, theoperator resets the people state control designation, the individualperson state control designation, and the presence of a designatedtraining label so that the data processing device 1 outputs a largenumber of pairs of crowd patch and training label depending on thesetting. Therefore, the operator can acquire a large amount of desiredtraining data.

FIG. 7 is a block diagram illustrating an exemplary structure of a crowdstate recognition device according to the present invention. A crowdstate recognition device 30 according to the present inventionrecognizes a crowd state in a given image. The crowd state recognitiondevice 30 includes the image acquisition device 3, a data processingdevice 4 operating under program control, and a storage device 5 forstoring information therein.

The image acquisition device 3 is a camera for acquiring an image to berecognized for a crowd state.

The storage device 5 includes a search window storage means 51 and acrowd state recognition dictionary storage means 52.

The search window storage means 51 stores a group of rectangular regionsindicating portions to be recognized for a crowd state on an image. Therectangular region may be called search window. The group of rectangularregions may be set by defining a changed size of a crowd patch dependingon a position on an image based on the camera parameters indicatingposition, posture, focal distance and lens distortion of the imageacquisition device 3 and the size of the reference site corresponding tothe crowd patch size (the size of the reference site stored in thelearning local image information storage means 22). For example, thesize of the reference site of a person shot in an image can be derivedfrom the camera parameters. The size of the crowd patch is enlarged ordownsized at an enlargement rate or downsizing rate when enlarging ordownsizing the size of the reference site of a person stored in thelearning local image information storage means 22 according to the sizeof the reference site, thereby setting the size of the rectangularregion. The group of rectangular regions may be set to cover thepositions on the image. The group of rectangular regions may be freelyset not limited to the method. Further, the group of rectangular regionsmay be set to be overlapped

The crowd state recognition dictionary storage means 52 stores adictionary of a discriminator learned by training data (a large numberof pairs of crowd patch and training label) generated by the trainingdata generating device 10 illustrated in FIG. 1 . The discriminator isan algorithm for recognizing a crowd state, and the dictionary of thediscriminator is used for performing a crowd state recognitionprocessing according to the algorithm. The dictionary of thediscriminator stored in the crowd state recognition dictionary storagemeans 52 is acquired by machine learning by use of a large number ofpairs of crowd patch and training label generated by the training datagenerating device 10, for example. The machine learning may bewell-known machine learning.

The data processing device 4 includes a crowd state recognition means41.

The crowd state recognition means 41 extracts local region imagescorresponding to the group of rectangular regions stored in the searchwindow storage means 51 from an image acquired by the image acquisitiondevice 3, and normalizes the extracted local region images to match withthe crowd patch size. The crowd state recognition means 41 thenrecognizes (determines) crowd states in the normalized local regionimages by use of the dictionary of the discriminator stored in the crowdstate recognition dictionary storage means 52 according to therecognition algorithm (or the discriminator).

The training data generating device 10 illustrated in FIG. 1 cangenerate a large amount of training data (pairs of crowd patch andtraining label) intended by the operator. The crowd state recognitionmeans 41 recognizes a crowd state in a local region image by use of thedictionary of the discriminator acquired as a result of machine learningusing such training data. Therefore, the crowd state recognition device30 can recognize a variety of crowd states.

FIG. 8 is a schematic diagram illustrating how to recognize a degree ofcongestion (the number of persons) as a crowd state in an image by wayof example. For example, it is assumed that the operator of the trainingdata generating device 10 mainly controls “number of persons” in astepwise manner and acquires large numbers of crowd patches and traininglabels (see the upper part of FIG. 8 ). It is then assumed that adictionary of the discriminator acquired by machine learning from thetraining data is stored in the crowd state recognition dictionarystorage means 52. In an image 61 illustrated in FIG. 8 , rectangularregions form which local region images are to be exacted are indicatedin broken lines. The recognition results of crowd states for the localregion images extracted according to the rectangular regions areexpressed corresponding to the regions in broken lines. This applies toFIG. 9 to FIG. 11 described below. Further, actual rectangular regionsare basically set to cover the entire image, but only some rectangularregions are illustrated by way of example for simply illustratingrecognition results. In this example, the crowd state recognition means41 can recognize the numbers of persons (degrees of congestion) invarious regions in the image 61 as illustrated in FIG. 8 .

FIG. 9 is a schematic diagram illustrating how to recognize a directionof a crowd as a crowd state in an image by way of example. For example,it is assumed that the operator of the training data generating device10 mainly controls “direction of person” and acquires large numbers ofcrowd patches and training labels (see the upper part of FIG. 9 ). It isthen assumed that a dictionary of the discriminator acquired by machinelearning from the training data is stored in the crowd state recognitiondictionary storage means 52. In this example, the crowd staterecognition means 41 can recognize directions of crowds in variousregions in an image 62 as illustrated in FIG. 9 .

FIG. 10 is a schematic diagram illustrating how to recognize anon-abnormal crowd (non-remarkably congested crowd) or an abnormal crowd(remarkably congested crowd) as a crowd state in an image by way ofexample. For example, it is assumed that the operator of the trainingdata generating device 10 mainly controls “number of persons” andacquires large numbers of crowd patches and training labels. Herein, itis assumed that a large amount of training data is acquired in twoclasses including when the number of persons is less than n and when thenumber of persons is n or more (see the upper part of FIG. 10 ). It isthen assumed that a dictionary of the discriminator acquired by machinelearning from the training data is stored in the crowd state recognitiondictionary storage means 52. In this example, the crowd staterecognition means 41 can recognize whether a crowd state in variousregions in an image 63 is a non-abnormal crowd or an abnormal crowd asillustrated in FIG. 10 .

FIG. 11 is a schematic diagram illustrating how to recognize adisordered state (directions of persons are not unified) or an orderedstate (directions of persons are unified) as a crowd state in an imageby way of example. For example, it is assumed that the operator of thetraining data generating device 10 acquires a large amount of trainingdata in two classes including when the “directions of persons” areunified and when not unified (see the upper part of FIG. 11 ). It isthen assumed that a dictionary of the discriminator acquired by machinelearning from the training data is stored in the crowd state recognitiondictionary storage means 52. In this example, the crowd staterecognition means 41 can recognize whether a crowd state in variousregions in an image 64 is a disordered state or an ordered state asillustrated in FIG. 11 .

Since a large amount of operator-intended training data can begenerated, the crowd state recognition means 41 can recognize variousstates such as discrete state in which a crowd scatters and runs,gathering state in which a crowd gathers at a location, avoidance statein which a crowd avoids something, hanging state indicating a specialcrowd cluster, and line state in addition to the cases illustrated inFIG. 8 to FIG. 11 .

A processing progress of the training data generating device 10according to the present invention will be described below. FIG. 12 is aflowchart illustrating an exemplary processing progress of the trainingdata generating device 10.

The background extraction means 11 selects a background image from thegroup of background images stored in the background image storage means21, and extracts an image used as the background of a crowd patch (stepS1).

FIG. 13 is a flowchart illustrating an exemplary processing progress ofstep S1. In step S1, the background extraction means 11 first selectsone background image from the group of background images stored in thebackground image storage means 21 (step S101). The selection method isnot particularly limited. For example, the background extraction means11 may select any one background image from the group of backgroundimages.

The background extraction means 11 then calculates an aspect ratio ofthe crowd patch size stored in the learning local image informationstorage means 22, and temporarily extracts a background at a properposition and a proper size from the selected background image to meetthe aspect ratio (step S102).

The background extraction means 11 enlarges or downsizes (or normalizes)the temporarily-extracted background image to match with the crowd patchsize thereby to acquire an image as the background of the crowd patch(step S103). That is the end of step S1.

After step S1, the background person state determination means 12determines a state of the person corresponding to the background (stepS2).

FIG. 14 is a flowchart illustrating an exemplary processing progress ofstep S2. The background person state determination means 12 definesarrangement of person, direction of person, number of persons, shootingangle of person, illumination to person, posture of person, clothes ofperson, body shape of person, hairstyle of person, person size whensynthesized with crowd patch, and the like, and temporarily determines astate of the person corresponding to the background according to thepeople state control designation stored in the crowd state controldesignation storage means 23 and the individual person state controldesignation stored in the person state control designation storage means24 (step S201).

The background person state determination means 12 then determineswhether the person state temporarily determined in step S201 meets thecondition of the background person state (step S202). The condition hasbeen described above, and thus the description thereof will be omittedherein.

The people state control designation or the individual person statecontrol designation may include a designation of “random” or the like,and thus the state temporarily determined in step S201 may not meet thecondition of the background person state. In this case (No in stepS202), the background person state determination means 12 repeatedlyperforms the processings in and subsequent to step S201.

When the state temporarily determined in step S201 meets the conditionof the background person state (Yes in step S202), the background personstate determination means 12 defines the latest person state temporarilydetermined in step S201 as the state of the person corresponding to thebackground (step S203). That is the end of step S2.

After step S2, the foreground person state determination means 13determines a state of the person corresponding to the foreground (stepS3).

FIG. 15 is a flowchart illustrating an exemplary processing progress ofstep S3. The foreground person state determination means 13 definesarrangement of person, direction of person, number of persons, shootingangle of person, illumination to person, posture of person, clothes ofperson, body shape of person, hairstyle of person, person size whensynthesized with crowd patch, and the like, and temporarily determines astate of the person corresponding to the foreground according the peoplestate control designation stored in the crowd state control designationstorage means 23 and the individual person state control designationstored in the person state control designation storage means 24 (stepS301).

The foreground person state determination means 13 then determineswhether the person state temporarily determined in step S301 meets thecondition of the foreground person state (step S302). The condition hasbeen described above, and thus the description thereof will be omittedherein.

The people state control designation or the individual person statecontrol designation may include a designation of “random” or the like,and thus the state temporarily determined in step S301 may not meet thecondition of the foreground person state. In this case (No in stepS302), the foreground person state determination means 13 repeatedlyperforms the processings in and subsequent to step S301.

When the state temporarily determined in step S301 meets the conditionof the foreground person state (Yes in step S302), the foreground personstate determination means 13 defines the latest person state temporarilydetermined in step S301 as the state of the person corresponding to theforeground (step S303). That is the end of step S3.

After step S3, the crowd state image synthesis means 14 generates crowdpatches based on the person states determined in steps S2 and S3, readstraining labels corresponding to the crowd patches, and outputs pairs ofcrowd patch and training labels (step S4).

FIG. 16 is a flowchart illustrating an exemplary processing progress ofstep S4. The crowd state image synthesis means 14 selects and readsperson images meeting the person states determined in steps S2 and S3(such as direction of person, number of persons, shooting angle ofperson, illumination to person, posture of person, clothes of person,body shape of person, and hairstyle of person) from the group of personimages in the person image storage means 25 (step S401).

The crowd state image synthesis means 14 then reads each person regionimage corresponding to each person image selected in step S401 from theperson region image storage means 26. The crowd state image synthesismeans 14 crops the image of only persons per person image by use of theperson region image corresponding to the person image (step S402).

The crowd state image synthesis means 14 determines an arrangement statefor each image of only persons generated in step S402 according to“arrangement of person” and “person size when synthesized with crowdpatch” determined in steps S2 and S3 (step S403). The crowd state imagesynthesis means 14 then synthesizes each image of only persons with thebackground image acquired in step S1 according to the arrangement statethereby to generate a crowd patch (step S404).

The crowd state image synthesis means 14 then acquires a training labelcorresponding to the crowd patch (step S405). That is, the crowd stateimage synthesis means 14 reads the contents of the people state controldesignation of an item with a designated training label from the crowdstate control designation storage means 23, and reads the contents ofthe individual person state control designation of an item with adesignated training label from the person state control designationstorage means 24. The read contents correspond to the training label.

The crowd state image synthesis means 14 outputs a pair of crowd patchgenerated in step S404 and training label acquired in step S405 (stepS406). That is the end of step S4.

After step S4, the control means 16 determines whether the number ofrepetitions of the processings in steps S1 to S4 reaches predeterminednumber of times (step S5). When the number of repetitions of theprocessings in steps S1 to S4 does not reach the predetermined number oftimes (No in step S5), the control means 16 causes the backgroundextraction means 11, the person state determination means 15(specifically the background person state determination means 12 and theforeground person state determination means 13) and the crowd stateimage synthesis means 14 to repeatedly perform the processings in stepsS1 to S4.

When the number of repetitions of the processings in steps S1 to S4reaches the predetermined number of times (Yes in step S5), theprocessing is terminated.

The processings in steps S1 to S4 are performed once so that a pair ofcrowd patch and training label is acquired. Therefore, the dataprocessing device 1 repeatedly performs the processings in steps S1 toS4 predetermined number of times so that a large amount of training datais acquired. For example, when the predetermined number of times isdefined at 100000, 100000 pairs of crowd patch and training labelmatching with the people state control designation and the individualperson state control designation are acquired.

The order of steps S1, S2 and S3 may be replaced in the flowchartillustrated in FIG. 12 .

A processing progress of the crowd state recognition device 30 accordingto the present invention will be described below. FIG. 17 is a flowchartillustrating an exemplary processing progress of the crowd staterecognition device 30.

The image acquisition device 3 acquires an image to be recognized for acrowd state, and inputs the image into the crowd state recognition means41 (step S21).

The crowd state recognition means 41 then determines whether the entiregroup of rectangular regions stored in the search window storage means51 has been selected (step S22).

When unselected rectangular regions are present in the group ofrectangular regions stored in the search window storage means 51 (No instep S22), the crowd state recognition means 41 selects one unselectedrectangular region from the group of rectangular regions (step S23).

The crowd state recognition means 41 then extracts a local region imagecorresponding to the selected rectangular region from the image input instep S21 (step S24). The crowd state recognition means 41 thennormalizes the local region image to match with the crowd patch size(step S25).

The crowd state recognition means 41 then recognizes a crowd statewithin the normalized local region image by use of the dictionary of thediscriminator stored in the crowd state recognition dictionary storagemeans 52 (step S26).

After step S26, the crowd state recognition means 41 repeatedly performsthe processings in and subsequent to step S22. When determining that theentire group of rectangular regions has been selected (Yes in step S22),the crowd state recognition means 41 then terminates the processing.

With the training data generating device according to the presentinvention, the person state determination means 15 determines the statesof persons configuring a crowd according to the people state controldesignation (the state designations for people such as “arrangement ofperson,” “direction of person” and “number of persons”) and theindividual person state control designation (the state designations forindividual person such as “shooting angle of person,” “illumination toperson,” “posture of person,” “clothes of person,” “body shape ofperson,” “hairstyle of person” and “person size when synthesized withcrowd patch”) defined by the operator. The crowd state image synthesismeans 14 then synthesizes the person images in the determined statesthereby to generate a crowd patch, and reads a training labelcorresponding to the crowd patch. Then, the processings of determining aperson state, generating a crowd patch and specifying a training labelare repeatedly performed predetermined number of times so that a largeamount of various training data (pairs of crowd patch and traininglabel) for the operator-intended crowd states can be automaticallygenerated.

Further, if a large amount of such training data is acquired, adictionary of the discriminator can be machine-learned from the trainingdata. Then the crowd state recognition device 30 can easily recognize acomplicated crowd state in a still image by use of the dictionary.

The crowd state recognition means 41 in the crowd state recognitiondevice 30 recognizes a crowd state in a given image by use of adictionary learned based on crowd patches expressing crowds and traininglabels corresponding to the crowd patches. Therefore, the crowd staterecognition means 41 recognizes a crowd state not in units of singleobjects such as person' head or person but in larger units of crowd as acollection of persons whose reference sites are shot. Thereby, a crowdstate in a small region where the heads or individual persons cannot berecognized can be recognized.

With the crowd state recognition device 30 according to the presentinvention, the crowd state recognition means 41 recognizes a crowd stateby use of the dictionary (the dictionary of the discriminator).Therefore, an accuracy of recognizing a crowd state does not depend on aframe rate. Thus, the crowd state recognition device according to thepresent invention can preferably recognize a crowd state in an imageirrespective of a frame rate. For example, the crowd state recognitiondevice 30 according to the present invention can preferably recognize acrowd state even in a still image.

The training data generating device 10 according to the above exemplaryembodiment determines a person state for “arrangement of person” such asoverlap between persons according to the people state controldesignation, and generates a crowd patch indicating the person state.When machine learning is performed by use of such a crowd patch, thestates including occlusion between persons can be also learned.Therefore, even when overlap (occlusion) between persons which isdifficult to recognize by head recognition or person recognition occurs,the crowd state recognition device 30 can preferably recognize a crowdstate by use of the dictionary acquired as a result of the learning.

The training data generating device 10 according to the above exemplaryembodiment determines a person state, generates a crowd patch shooting aperson in the state, and specifies a training label corresponding to thecrowd patch according to the information (the people state controldesignation) designating a person state of people and the information(the individual person state control designation) designating a personstate of each person. Therefore, the operator defines the people statecontrol designation or the individual person state control designationthereby to easily acquire training data for recognizingdifferent-property crowd states. Then, the training data ismachine-learned thereby to easily make the crowd state recognitiondevice 30 for recognizing different-property crowd states.

According to the above exemplary embodiment, if the camera parametersindicating position, posture, focal distance and lens distortion of theimage acquisition device (camera) 3 in a crowd shooting environment canbe acquired, the people state control designation or the individualperson state control designation limited to the environment can bedefined by use of the camera parameters. The training data generatingdevice 10 determines a person state according to the people statecontrol designation or the individual person state control designationand generates training data, thereby learning a dictionary of thediscriminator suitable for the crowd shooting environment. Consequently,the crowd state recognition device 30 can recognize a complicated crowdstate in a still image or the like with a high accuracy.

According to the above exemplary embodiment, if the camera parametersindicating position, posture, focal distance and lens distortion of theimage acquisition device 3 in a recognition environment can be acquired,a person state for people and a person state of each person can becontrolled per local region on an image. Then, large numbers ofoperator-intended crowd patches and training labels corresponding to thecrowd patches can be automatically generated by synthesizing the personimages based on the controlled person states. Then, a dictionary of thediscriminator can be learned per local region on the image based on thecrowd patches and the training labels, and an accuracy of recognizing acomplicated crowd state can be increased by use of the dictionaries ofthe discriminator per region on the image.

The specific structures of the training data generating device and thecrowd state recognition device according to the present invention willbe described below by way of example. FIG. 18 is a block diagramillustrating a specific structure of the training data generating deviceaccording to the present invention by way of example. The samecomponents as the components illustrated in FIG. 1 are denoted with thesame reference numerals as in FIG. 1 , and a detailed descriptionthereof will be omitted. In the exemplary structure illustrated in FIG.18 , the storage device 2 including the background image storage means21, the learning local image information storage means 22, the crowdstate control designation storage means 23, the person state controldesignation storage means 24, the person image storage means 25 and theperson region image storage means 26 is connected to a computer 100. Acomputer readable storage medium 102 for storing a training datagenerating program 101 therein is also connected to the computer 100.

The computer readable storage medium 102 is realized by a magnetic disk,a semiconductor memory, or the like, for example. For example, whenactivated, the computer 100 reads the training data generating program101 from the computer readable storage medium 102. The computer 100 thenoperates as the background extraction means 11, the person statedetermination means 15 (more specifically, the background person statedetermination means 12 and the foreground person state determinationmeans 13), the crowd state image synthesis means 14 and the controlmeans 16 in the data processing device 1 illustrated in FIG. 1 accordingto the training data generating program 101.

FIG. 19 is a block diagram illustrating a specific structure of thecrowd state recognition device according to the present invention by wayof example. The same components as the components illustrated in FIG. 7are denoted with the same reference numerals as in FIG. 7 , and adetailed description thereof will be omitted. In the exemplary structureillustrated in FIG. 19 , the storage device 5 including the searchwindow storage means 51 and the crowd state recognition dictionarystorage means 52 is connected to a computer 150. A computer readablestorage medium 104 for storing a crowd state recognition program 103therein is also connected to the computer 150.

The computer readable storage medium 104 is realized by a magnetic disk,a semiconductor memory, or the like, for example. For example, whenactivated, the computer 150 reads the crowd state recognition program103 from the computer readable storage medium 104. The computer 150 thenoperates as the crowd state recognition means 41 in the data processingdevice 4 illustrated in FIG. 7 according to the crowd state recognitionprogram 103.

There has been described in the above exemplary embodiment the case inwhich the crowd state recognition dictionary storage means 52 (see FIG.7 ) stores the dictionaries acquired by learning by use of training datagenerated by the training data generating device 10 (see FIG. 1 ). Inother words, there has been described in the above exemplary embodimentthe case in which the dictionaries acquired by machine learning by useof a plurality of pairs of crowd patch acquired by synthesizing personimages matching with person states controlled to desired states andtraining label for the crowd patch are stored in the crowd staterecognition dictionary storage means 52.

The crowd state recognition dictionary storage means 52 may store adictionary acquired by machine learning by use of data other than thetraining data generated by the training data generating device 10 astraining data. Even for training data other than the training datagenerated by the training data generating device 10, a plurality ofpairs of crowd patch including a person whose reference site isexpressed as large as the size of the reference site of a person definedfor the size of the crowd patch and training label for the crowd patchare prepared and may be used as training data. That is, a dictionary ofthe discriminator acquired by machine learning by use of the pairs ofcrowd patch and training label may be stored in the crowd staterecognition dictionary storage means 52. Also in this case, there can beobtained an effect that a crowd state in an image can be preferablyrecognized irrespective of a frame rate.

Main parts according to the present invention will be described below.FIG. 20 is a block diagram illustrating main parts in the training datagenerating device according to the present invention. The training datagenerating device according to the present invention includes abackground extraction unit 71, a person state determination unit 72, anda crowd state image synthesis unit 73.

The background extraction unit 71 (the background extraction means 11,for example) selects a background image from a plurality ofpreviously-prepared background images, extracts a region in thebackground image, and enlarges or downsize the image corresponding tothe extracted region to an image at a predetermined size.

The person state determination unit 72 (the person state determinationmeans 15, for example) determines a person state of a crowd according tothe people state control designation as designation information on aperson state of people and the individual person state controldesignation as designation information on a state of an individualperson in the people.

The crowd state image synthesis unit 73 generates a crowd state image(such as crowd patch) as an image in which a person image correspondingto the person state determined by the person state determination unit 72is synthesized with the image at a predetermined size acquired by thebackground extraction unit 71, specifies a training label for the crowdstate image, and outputs a pair of crowd state image and training label.

For example, the background extraction unit 71, the person statedetermination unit 72, and the crowd state image synthesis unit 73sequentially repeats the operations. The operations of the backgroundextraction unit 71, the person state determination unit 72, and thecrowd state image synthesis unit 73 may not be sequentially performed.For example, the background extraction unit 71 and the person statedetermination unit 72 may perform the operations in parallel.

With the structure, a large amount of training data used formachine-learning a dictionary of the discriminator for recognizing acrowd state can be easily generated.

FIG. 21 is a block diagram illustrating main parts in the crowd staterecognition device according to the present invention. The crowd staterecognition device according to the present invention includes arectangular region group storage unit 81, a crowd state recognitiondictionary storage unit 82, and a crowd state recognition unit 83.

The rectangular region group storage unit 81 (the search window storagemeans 51, for example) stores a group of rectangular regions indicatingportions to be recognized for a crowd state on an image.

The crowd state recognition dictionary storage unit 82 (the crowd staterecognition dictionary storage means 52, for example) stores adictionary of the discriminator acquired by machine-learning by use of aplurality of pairs of crowd state image (such as crowd patch) as animage including a person whose reference site is expressed as large asthe size of the reference site of a person defined for a predeterminedsize of the image expressing a crowd state therein and training labelfor the crowd state image.

The crowd state recognition unit 83 (the crowd state recognition means41, for example) extracts regions indicated by the group of rectangularregions stored in the rectangular region group storage unit 81 from agiven image, and recognizes states of the crowds shot in the extractedimages based on the dictionary.

With the structure, a crowd state in an image can be preferablyrecognized irrespective of a frame rate.

Part or all of the above exemplary embodiment can be described as in thefollowing supplementary notes, but is not limited to the following.

(Supplementary Note 1)

A training data generating device including:

-   -   a background extraction means for selecting a background image        from a plurality of previously-prepared background images,        extracting a region in the background image, and enlarging or        downsizing the image corresponding to the extracted region to an        image at a predetermined size;    -   a person state determination means for determining a person        state of a crowd according to a people state control designation        as designation information on a person state of people and an        individual person state control designation as designation        information on a state of an individual person in the people;        and    -   a crowd state image synthesis means for generating a crowd state        image as an image in which a person image corresponding to the        person state determined by the person state determination means        is synthesized with the image at a predetermined size acquired        by the background extraction means, specifying a training label        for the crowd state image, and outputting a pair of crowd state        image and training label.

(Supplementary Note 2)

The training data generating device according to Supplementary Note 1,

-   -   wherein the person state determination means temporarily        determines a person state of a crowd according to the people        state control designation and the individual person state        control designation, determines the temporarily-determined        person state as the person state of the crowd when the        temporarily-determined person state meets conditions for the        size of a reference site of a person defined for the        predetermined size and how the reference site is expressed, and        repeatedly makes the temporary determination of the person state        of the crowd when the temporarily-determined person state does        not meet the conditions.

(Supplementary Note 3)

The training data generating device according to Supplementary Note 1 or2, including:

-   -   a crowd state control designation storage means for storing the        people state control designation defined per item and storing        the presence of a designated training label defined for the        item; and    -   a person state control designation storage means for storing the        individual person state control designation defined per item and        storing the presence of a designated training label defined for        the item,    -   wherein the person state determination means determines a person        state of a crowd according to the people state control        designation stored in the crowd state control designation        storage means and the individual person state control        designation stored in the person state control designation        storage means, and    -   the crowd state image synthesis means specifies a training label        by reading the people state control designation of an item        defined as having a designated training label from the crowd        state control designation storage means and reading the        individual person state control designation of an item defined        as having a designated training label from the person state        control designation storage means.

(Supplementary Note 4)

The training data generating device according to Supplementary Note 3,

-   -   wherein the crowd state control designation storage means stores        at least one item as having a designated training label, and    -   the crowd state image synthesis means reads the people state        control designation of an item defined as having a designated        training label from the crowd state control designation storage        means.

(Supplementary Note 5)

The training data generating device according to Supplementary Note 3 or4,

-   -   wherein the crowd state control designation storage means stores        the people state control designation and the presence of a        designated training label per item such as arrangement of        person, direction of person, and number of persons, and stores        the people state control designation corresponding to each item        in any one of a first form of designating a specific state, a        second form of designating that an arbitrary state may be        defined, and a third form of designating that a state may be        defined within a defined rule,    -   the person state control designation storage means stores the        individual person state designation and the presence of a        designated training label per item such as shooting angle of        person, illumination to person, posture of person, clothes of        person, body shape of person, hairstyle of person, and person        size when synthesized with crowd state image, and stores the        individual person state control designation corresponding to        each item in any one of the first form, the second form and the        third form, and    -   the person state determination means determines a person state        of a crowd according to the people state control designation        stored in the crowd state control designation storage means and        the individual person state control designation stored in the        person state control designation storage means.

(Supplementary Note 6)

The training data generating device according to any one ofSupplementary Notes 1 to 5,

-   -   wherein the crowd state image synthesis means selects a person        image matching with the determined person states such as        direction of person, number of persons, shooting angle of        person, illumination to person, posture of person, clothes of        person, body shape of person, and hairstyle of person from a        group of previously-prepared person images, crops the region of        a person from the selected person image thereby to generate an        image of only the person, and synthesizes the image of only the        person with the image at a predetermined size acquired by the        background extraction means according to arrangement of person        and person size when synthesized with crowd state image        determined as the person states.

(Supplementary Note 7)

The training data generating device according to Supplementary Note 6,

-   -   wherein the crowd state image synthesis means sequentially        synthesizes from an image of only a person corresponding to the        farthest arrangement position from a camera with the image at a        predetermined size acquired by the background extraction means.

(Supplementary Note 8)

The training data generating device according to any one ofSupplementary Notes 1 to 7,

-   -   wherein the person state determination means includes:    -   a background person state determination means for temporarily        determining a person state of a crowd as the background in a        crowd state image according to the people state control        designation and the individual person state control designation,        determining the temporarily-determined person state as the        person state of the crowd as the background when the        temporarily-determined person state meets a first condition for        the size of the reference site of a person defined for the        predetermined size of the crowd state image and how the        reference site is expressed, and repeatedly making the temporary        determination of the person state of the crowd as the background        when the temporarily-determined person state does not meet the        first condition; and    -   a foreground person state determination means for temporarily        determining a person state of a crowd as the foreground in a        crowd state image according to the people state control        designation and the individual person state control designation,        determining the temporarily-determined person state as the        person state of the crowd as the foreground when the        temporarily-determined person state meets a second condition for        the size of the reference site defined for the predetermined        size of the crowd state image and how the reference site is        expressed, and repeatedly making the temporary determination of        the person state of the crowd as the foreground when the        temporarily-determined person state does not meet the second        condition.

(Supplementary Note 9)

The training data generating device according to Supplementary Note 8,

-   -   wherein the first condition is that the reference site of a        person is not within a crowd state image or that the size of the        reference site is much larger or much smaller than the size of        the reference site of a person defined for the predetermined        size, and    -   the second condition is that the reference site of a person is        within a crowd state image and the size of the reference site is        as large as the size of the reference site of a person defined        for the predetermined size.

(Supplementary Note 10)

A crowd state recognition device including:

-   -   a rectangular region group storage means for storing a group of        rectangular regions indicating portions to be recognized for a        crowd state on an image;    -   a crowd state recognition dictionary storage means for storing a        dictionary of a discriminator acquired by machine learning by        use of a plurality of pairs of crowd state image as an image        which expresses a crowd state at a predetermined size and        includes a person whose reference site is expressed as large as        the size of the reference site of a person defined for the        predetermined size, and training label for the crowd state        image; and    -   a crowd state recognition means for extracting regions indicated        in the group of rectangular regions stored in the rectangular        region group storage means from a given image, and recognizing        states of the crowds shot in the extracted images based on the        dictionary.

(Supplementary Note 11)

The crowd state recognition device according to Supplementary Note 10,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by machine        learning by use of a plurality of pairs of crowd state image        acquired by synthesizing person images matching with person        states controlled to desired states and training label for the        crowd state image, and    -   the crowd state recognition means recognizes states of the        crowds shot in the images based on the dictionary.

(Supplementary Note 12)

The crowd state recognition device according to Supplementary Note 10 or11,

-   -   wherein the rectangular region group storage means stores a        group of size-defined rectangular regions based on camera        parameters indicating position, posture, focal distance and lens        distortion of an image acquisition device for acquiring an        image, and the size of the reference site of a person defined        for the predetermined size, and    -   the crowd state recognition means extracts regions indicated in        the group of rectangular regions from a given image.

(Supplementary Note 13)

The crowd state recognition device according to any one of SupplementaryNotes 10 to 12,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by changing        the number of persons expressed in a crowd state image and by        machine learning by use of a plurality of pairs of crowd state        image and training label prepared for the number of persons, and    -   the crowd state recognition means recognizes the number of        persons in the crowd shot in the image based on the dictionary.

(Supplementary Note 14)

The crowd state recognition device according to any one of SupplementaryNotes 10 to 13,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by changing        directions of persons expressed in a crowd state image and by        machine learning by use of a plurality of pairs of crowd state        image and training label prepared for the directions of persons,        and    -   the crowd state recognition means recognizes the direction of        the crowd shot in the image based on the dictionary.

(Supplementary Note 15)

The crowd state recognition device according to any one of SupplementaryNotes 10 to 14,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by machine        learning by use of a plurality of pairs of crowd state image and        training label prepared for a non-remarkably congested crowd and        a remarkably congested crowd, and    -   the crowd state recognition means recognizes whether the crowd        shot in an image is remarkably congested based on the        dictionary.

(Supplementary Note 16)

The crowd state recognition device according to any one of SupplementaryNotes 10 to 15,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by machine        learning by use of a plurality of pairs of crowd state image and        training label prepared for a crowd in which directions of        persons are unified and a crowd in which directions of persons        are not unified, and    -   the crowd state recognition means recognizes whether directions        of persons in the crowd shot in an image are unified based on        the dictionary.

(Supplementary Note 17)

A training data generating method including:

-   -   a background extraction step of selecting a background image        from a plurality of previously-prepared background images,        extracting a region in the background image, and enlarging or        downsizing the image corresponding to the extracted region to an        image at a predetermined size;    -   a person state determination step of determining a person state        of a crowd according to a people state control designation as        designation information on a person state of people and an        individual person state control designation as designation        information on a state of an individual person in the people;        and    -   a crowd state image synthesis step of generating a crowd state        image as an image in which a person image corresponding to the        person state determined in the person state determination step        is synthesized with the image at a predetermined size acquired        in the background extraction step, specifying a training label        for the crowd state image, and outputting a pair of crowd state        image and training label.

(Supplementary Note 18)

The training data generating method according to Supplementary Note 17,including:

-   -   the person state determination step of temporarily determining a        person state of a crowd according to the people state control        designation and the individual person state control designation,        determining the temporarily-determined person state as the        person state of the crowd when the temporarily-determined person        state meets conditions for the size of a reference site of a        person defined for the predetermined size and how the reference        site is expressed, and repeatedly making the temporary        determination of the person state of the crowd when the        temporarily-determined person state does not meet the        conditions.

(Supplementary Note 19)

The training data generating method according to Supplementary Note 17or 18,

-   -   wherein a crowd state control designation storage means stores        the people state control designation defined per item and        storing the presence of a designated training label defined for        the item, and    -   a person state control designation storage means stores the        individual person state control designation defined per item and        storing the presence of a designated training label defined for        the item,    -   the method including:    -   the person state determination step of determining a person        state of a crowd according to the people state control        designation stored in the crowd state control designation        storage means and the individual person state control        designation stored in the person state control designation        storage means; and    -   the crowd state image synthesis step of specifying a training        label by reading the people state control designation of an item        defined as having a designated training label from the crowd        state control designation storage means and reading the        individual person state control designation of an item defined        as having a designated training label from the person state        control designation storage means.

(Supplementary Note 20)

The training data generating method according to Supplementary Note 19,

-   -   wherein the crowd state control designation storage means stores        at least one item as having a designated training label,    -   the method including the crowd state image synthesis step of        reading the people state control designation of an item defined        as having a designated training label from the crowd state        control designation storage means.

(Supplementary Note 21)

The training data generating method according to Supplementary Note 19or 20,

-   -   wherein the crowd state control designation storage means stores        the people state control designation and the presence of a        designated training label per item such as arrangement of        person, direction of person, and number of persons, and stores        the people state control designation corresponding to each item        in any one of a first form of designating a specific state, a        second form of designating that an arbitrary state may be        defined, and a third form of designating that a state may be        defined within a defined rule, and    -   the person state control designation storage means stores the        individual person state designation and the presence of a        designated training label per item such as shooting angle of        person, illumination to person, posture of person, clothes of        person, body shape of person, hairstyle of person, and person        size when synthesized with crowd state image, and stores the        individual person state control designation corresponding to        each item in any one of the first form, the second form and the        third form,    -   the method including the person state determination step of        determining a person state of a crowd according to the people        state control designation stored in the crowd state control        designation storage means and the individual person state        control designation stored in the person state control        designation storage means.

(Supplementary Note 22)

The training data generating method according to any one ofSupplementary Notes 17 to 21, including:

-   -   the crowd state image synthesis step of selecting a person image        matching with the determined person states such as direction of        person, number of persons, shooting angle of person,        illumination to person, posture of person, clothes of person,        body shape of person, and hairstyle of person from a group of        previously-prepared person images, cropping the region of a        person from the selected person image thereby to generate an        image of only the person, and synthesizing the image of only the        person with the image at a predetermined size acquired by the        background extraction means according to arrangement of person        and person size when synthesized with crowd state image        determined as the person states.

(Supplementary Note 23)

The training data generating method according to Supplementary Note 22,including:

-   -   the crowd state image synthesis step of sequentially        synthesizing from an image of only a person corresponding to the        farthest arrangement position from a camera with the image at a        predetermined size acquired by the background extraction means.

(Supplementary Note 24)

The training data generating method according to any one ofSupplementary Notes 17 to 23,

-   -   wherein the person state determination step includes:    -   a background person state determination step of temporarily        determining a person state of a crowd as the background in a        crowd state image according to the people state control        designation and the individual person state control designation,        determining the temporarily-determined person state as the        person state of the crowd as the background when the        temporarily-determined person state meets a first condition for        the size of the reference site of a person defined for the        predetermined size of the crowd state image and how the        reference site is expressed, and repeatedly making the temporary        determination of the person state of the crowd as the background        when the temporarily-determined person state does not meet the        first condition; and    -   a foreground person state determination step of temporarily        determining a person state of a crowd as the foreground in a        crowd state image according to the people state control        designation and the individual person state control designation,        determining the temporarily-determined person state as the        person state of the crowd as the foreground when the        temporarily-determined person state meets a second condition for        the size of the reference site defined for the predetermined        size of the crowd state image and how the reference site is        expressed, and repeatedly making the temporary determination of        the person state of the crowd as the foreground when the        temporarily-determined person state does not meet the second        condition.

(Supplementary Note 25)

The training data generating method according to Supplementary Note 24,

-   -   wherein the first condition is that the reference site of a        person is not within a crowd state image or that the size of the        reference site is much larger or much smaller than the size of        the reference site of a person defined for the predetermined        size, and    -   the second condition is that the reference site of a person is        within a crowd state image and the size of the reference site is        as large as the size of the reference site of a person defined        for the predetermined size.

(Supplementary Note 26)

A crowd state recognition method,

-   -   wherein a rectangular region group storage means stores a group        of rectangular regions indicating portions to be recognized for        a crowd state on an image, and    -   a crowd state recognition dictionary storage means stores a        dictionary of a discriminator acquired by machine learning by        use of a plurality of pairs of crowd state image as an image        which expresses a crowd state at a predetermined size and        includes a person whose reference site is expressed as large as        the size of the reference site of a person defined for the        predetermined size, and training label for the crowd state        image,    -   the method including a crowd state recognition step of        extracting regions indicated in the group of rectangular regions        stored in the rectangular region group storage means from a        given image, and recognizing states of the crowds shot in the        extracted images based on the dictionary.

(Supplementary Note 27)

The crowd state recognition method according to Supplementary Note 26,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by machine        learning by use of a plurality of pairs of crowd state image        acquired by synthesizing person images matching with person        states controlled to desired states and training label for the        crowd state image,    -   the method including the crowd state recognition step of        recognizing states of the crowds shot in the images based on the        dictionary.

(Supplementary Note 28)

The crowd state recognition method according to Supplementary Note 26 or27,

-   -   wherein the rectangular region group storage means stores a        group of size-defined rectangular regions based on camera        parameters indicating position, posture, focal distance and lens        distortion of an image acquisition device for acquiring an        image, and the size of the reference site of a person defined        for the predetermined size,    -   the method including the crowd state recognition step of        extracting regions indicated in the group of rectangular regions        from a given image.

(Supplementary Note 29)

The crowd state recognition method according to any one of SupplementaryNotes 26 to 28,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by changing        the number of persons expressed in a crowd state image and by        machine learning by use of a plurality of pairs of crowd state        image and training label prepared for the number of persons,    -   the method including the crowd state recognition step of        recognizing the number of persons in the crowd shot in the image        based on the dictionary.

(Supplementary Note 30)

The crowd state recognition method according to any one of SupplementaryNotes 26 to 29,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by changing        directions of persons expressed in a crowd state image and by        machine learning by use of a plurality of pairs of crowd state        image and training label prepared for the directions of persons,    -   the method including the crowd state recognition step of        recognizing the direction of the crowd shot in the image based        on the dictionary.

(Supplementary Note 31)

The crowd state recognition method according to any one of SupplementaryNotes 26 to 30,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by machine        learning by use of a plurality of pairs of crowd state image and        training label prepared for a non-remarkably congested crowd and        a remarkably congested crowd,    -   the method including the crowd state recognition step of        recognizing whether the crowd shot in an image is remarkably        congested based on the dictionary.

(Supplementary Note 32)

The crowd state recognition method according to any one of SupplementaryNotes 26 to 31,

-   -   wherein the crowd state recognition dictionary storage means        stores a dictionary of the discriminator acquired by machine        learning by use of a plurality of pairs of crowd state image and        training label prepared for a crowd in which directions of        persons are unified and a crowd in which directions of persons        are not unified,    -   the method including the crowd state recognition step of        recognizing whether directions of persons in the crowd shot in        an image are unified based on the dictionary.

(Supplementary Note 33)

A training data generating program for causing a computer to perform:

-   -   a background extraction processing of selecting a background        image from a plurality of previously-prepared background images,        extracting a region in the background image, and enlarging or        downsizing the image corresponding to the extracted region to an        image at a predetermined size;    -   a person state determination processing of determining a person        state of a crowd according to a people state control designation        as designation information on a person state of people and an        individual person state control designation as designation        information on a state of an individual person in the people;        and    -   a crowd state image synthesis processing of generating a crowd        state image as an image in which a person image corresponding to        the person state determined in the person state determination        processing is synthesized with the image at a predetermined size        acquired in the background extraction processing, specifying a        training label for the crowd state image, and outputting a pair        of crowd state image and training label.

(Supplementary Note 34)

The training data generating program according to Supplementary Note 33,the program for causing a computer to perform:

-   -   the person state determination processing of temporarily        determining a person state of a crowd according to the people        state control designation and the individual person state        control designation, determining the temporarily-determined        person state as the person state of the crowd when the        temporarily-determined person state meets conditions for the        size of a reference site of a person defined for the        predetermined size and how the reference site is expressed, and        repeatedly making the temporary determination of the person        state of the crowd when the temporarily-determined person state        does not meet the conditions.

(Supplementary Note 35)

The training data generating program according to Supplementary Note 33or 34, the program for causing a computer including a crowd statecontrol designation storage means for storing the people state controldesignation defined per item and storing the presence of a designatedtraining label defined for the item, and a person state controldesignation storage means for storing the individual person statecontrol designation defined per item and storing the presence of adesignated training label defined for the item to perform:

-   -   the person state determination step of determining a person        state of a crowd according to the people state control        designation stored in the crowd state control designation        storage means and the individual person state control        designation stored in the person state control designation        storage means, and    -   the crowd state image synthesis step of specifying a training        label by reading the people state control designation of an item        defined as having a designated training label from the crowd        state control designation storage means and reading the        individual person state control designation of an item defined        as having a designated training label from the person state        control designation storage means.

(Supplementary Note 36)

The training data generating program according to Supplementary Note 35,the program for causing a computer including the crowd state controldesignation storage means for storing at least one item as having adesignated training label to perform:

-   -   the crowd state image synthesis processing of reading the people        state control designation of an item defined as having a        designated training label from the crowd state control        designation storage means.

(Supplementary Note 37)

The training data generating program according to Supplementary Note 35or 36, the program for causing a computer including the crowd statecontrol designation storage means for storing the people state controldesignation and the presence of a designated training label per itemsuch as arrangement of person, direction of person, and number ofpersons, and stores the people state control designation correspondingto each item in any one of a first form of designating a specific state,a second form of designating that an arbitrary state may be defined, anda third form of designating that a state may be defined within a definedrule, and the person state control designation storage means for storingthe individual person state designation and the presence of a designatedtraining label per item such as shooting angle of person, illuminationto person, posture of person, clothes of person, body shape of person,hairstyle of person, and person size when synthesized with crowd stateimage, and stores the individual person state control designationcorresponding to each item in any one of the first form, the second formand the third form to perform:

-   -   the person state determination processing of determining a        person state of a crowd according to the people state control        designation stored in the crowd state control designation        storage means and the individual person state control        designation stored in the person state control designation        storage means.

(Supplementary Note 38)

The training data generating program according to any one ofSupplementary Notes 33 to 37, the program for causing a computer toperform:

-   -   the crowd state image synthesis processing of selecting a person        image matching with the determined person states such as        direction of person, number of persons, shooting angle of        person, illumination to person, posture of person, clothes of        person, body shape of person, and hairstyle of person from a        group of previously-prepared person images, cropping the region        of a person from the selected person image thereby to generate        an image of only the person, and synthesizing the image of only        the person with the image at a predetermined size acquired by        the background extraction means according to arrangement of        person and person size when synthesized with crowd state image        determined as the person states.

(Supplementary Note 39)

The training data generating program according to Supplementary Note 38,the program for causing a computer to perform:

-   -   the crowd state image synthesis processing of sequentially        synthesizing from an image of only a person corresponding to the        farthest arrangement position from a camera with the image at a        predetermined size acquired by the background extraction means.

(Supplementary Note 40)

The training data generating program according to any one ofSupplementary Notes 33 to 39, the program for causing a computer toperform in the person state determination processing:

-   -   a background person state determination processing of        temporarily determining a person state of a crowd as the        background in a crowd state image according to the people state        control designation and the individual person state control        designation, determining the temporarily-determined person state        as the person state of the crowd as the background when the        temporarily-determined person state meets a first condition for        the size of the reference site of a person defined for the        predetermined size of the crowd state image and how the        reference site is expressed, and repeatedly making the temporary        determination of the person state of the crowd as the background        when the temporarily-determined person state does not meet the        first condition; and    -   a foreground person state determination processing of        temporarily determining a person state of a crowd as the        foreground in a crowd state image according to the people state        control designation and the individual person state control        designation, determining the temporarily-determined person state        as the person state of the crowd as the foreground when the        temporarily-determined person state meets a second condition for        the size of the reference site defined for the predetermined        size of the crowd state image and how the reference site is        expressed, and repeatedly making the temporary determination of        the person state of the crowd as the foreground when the        temporarily-determined person state does not meet the second        condition.

(Supplementary Note 41)

The training data generating program according to Supplementary Note 40,

-   -   wherein the first condition is that the reference site of a        person is not within a crowd state image or that the size of the        reference site is much larger or much smaller than the size of        the reference site of a person defined for the predetermined        size, and    -   the second condition is that the reference site of a person is        within a crowd state image and the size of the reference site is        as large as the size of the reference site of a person defined        for the predetermined size.

(Supplementary Note 42)

A crowd state recognition program for causing a computer including arectangular region group storage means for storing a group ofrectangular regions indicating portions to be recognized for a crowdstate on an image, and a crowd state recognition dictionary storagemeans for storing a dictionary of a discriminator acquired by machinelearning by use of a plurality of pairs of crowd state image as an imagewhich expresses a crowd state at a predetermined size and includes aperson whose reference site is expressed as large as the size of thereference site of a person defined for the predetermined size, andtraining label for the crowd state image to perform:

-   -   a crowd state recognition processing of extracting regions        indicated in the group of rectangular regions stored in the        rectangular region group storage means from a given image, and        recognizing states of the crowds shot in the extracted images        based on the dictionary.

(Supplementary Note 43)

The crowd state recognition program according to Supplementary Note 42,the program for causing a computer including the crowd state recognitiondictionary storage means for storing a dictionary of the discriminatoracquired by machine learning by use of a plurality of pairs of crowdstate image acquired by synthesizing person images matching with personstates controlled to desired states and training label for the crowdstate image to perform:

-   -   the crowd state recognition processing of recognizing states of        the crowds shot in the images based on the dictionary.

(Supplementary Note 44)

The crowd state recognition program according to Supplementary Note 42or 43, the program for causing a computer including the rectangularregion group storage means for storing a group of size-definedrectangular regions based on camera parameters indicating position,posture, focal distance and lens distortion of an image acquisitiondevice for acquiring an image, and the size of the reference site of aperson defined for the predetermined size to perform:

-   -   the crowd state recognition processing of extracting regions        indicated in the group of rectangular regions from a given        image.

(Supplementary Note 45)

The crowd state recognition program according to any one ofSupplementary Notes 42 to 44, the program for causing a computerincluding the crowd state recognition dictionary storage means forstoring a dictionary of the discriminator acquired by changing thenumber of persons expressed in a crowd state image and by machinelearning by use of a plurality of pairs of crowd state image andtraining label prepared for the number of persons to perform:

-   -   the crowd state recognition processing of recognizing the number        of persons in the crowd shot in the image based on the        dictionary.

(Supplementary Note 46)

The crowd state recognition program according to any one ofSupplementary Notes 42 to 45, the program for causing a computerincluding the crowd state recognition dictionary storage means forstoring a dictionary of the discriminator acquired by changingdirections of persons expressed in a crowd state image and by machinelearning by use of a plurality of pairs of crowd state image andtraining label prepared for the directions of persons to perform:

-   -   the crowd state recognition processing of recognizing the        direction of the crowd shot in the image based on the        dictionary.

(Supplementary Note 47)

The crowd state recognition program according to any one ofSupplementary Notes 42 to 46, the program for causing a computerincluding the crowd state recognition dictionary storage means forstoring a dictionary of the discriminator acquired by machine learningby use of a plurality of pairs of crowd state image and training labelprepared for a non-remarkably congested crowd and a remarkably congestedcrowd to perform:

-   -   the crowd state recognition processing of recognizing whether        the crowd shot in an image is remarkably congested based on the        dictionary.

(Supplementary Note 48)

The crowd state recognition program according to any one ofSupplementary Notes 42 to 47, the program for causing a computerincluding the crowd state recognition dictionary storage means forstoring a dictionary of the discriminator acquired by machine learningby use of a plurality of pairs of crowd state image and training labelprepared for a crowd in which directions of persons are unified and acrowd in which directions of persons are not unified to perform:

-   -   the crowd state recognition processing of recognizing whether        directions of persons in the crowd shot in an image are unified        based on the dictionary.

The present invention has been described with reference to the exemplaryembodiment, but the present invention is not limited to the aboveexemplary embodiment. The structure and details of the present inventioncan be variously changed within the scope of the present inventionunderstandable by those skilled in the art.

The present application claims the priority based on Japanese PatentApplication No. 2013-135915 filed on Jun. 28, 2013, the disclosure ofwhich is all incorporated herein by reference.

INDUSTRIAL APPLICABILITY

The present invention is suitably applicable to a training datagenerating device for generating training data when learning adictionary of a discriminator used for recognizing a crowd state.

The present invention is suitably applied to a crowd state recognitiondevice for recognizing a crowd state in an image. In particular, thepresent invention is suitably applicable to recognize a crowd state inan image at a low frame rate. Further, the present invention can besuitably used also when a frame rate is not stable and a crowd staterecognition processing using time information cannot be performed.Further, the present invention can be suitably used for recognizing acomplicated crowd state including overlap between persons from a stillimage. Further, the present invention can be used for suspicious personrecognition, left suspicious object recognition, tailgating recognition,abnormal state recognition, abnormal behavior recognition, and the likein the field of monitoring for recognizing a crowd state from an imageacquired by a camera. Furthermore, the present invention may be used foroutputting a recognition result of a crowd state in an image togetherwith a position (2D position or 3D position) of the crowd to othersystem. Furthermore, the present invention can be used for acquiring arecognition result of a crowd state in an image and a position (2Dposition or 3D position) of the crowd and making video search with theacquisition as a trigger.

REFERENCE SIGNS LIST

-   -   11 Background extraction means    -   12 Background person state determination means    -   13 Foreground person state determination means    -   14 Crowd state image synthesis means    -   Person state determination means    -   16 Control means    -   21 Background image storage means    -   22 Learning local image information storage means    -   23 Crowd state control designation storage means    -   24 Person state control designation storage means    -   Person image storage means    -   26 Person region image storage means    -   41 Crowd state recognition means    -   51 Search window storage means    -   52 Crowd state recognition dictionary storage means

1. A training data generating device comprising: at least one processorconfigured to: generate a crowd state image as an image in which aperson image corresponding to a person state is synthesized withpreviously-prepared image at a predetermined size; specify a traininglabel for the crowd state image; and output a pair of crowd state imageand training label.
 2. The training data generating device according toclaim 1, wherein the at least one processor is further configured todetermine the person state of a crowd according to a people statecontrol designation as designation information on a person state ofpeople and an individual person state control designation as designationinformation on a state of an individual person in the people.
 3. Thetraining data generating device according to claim 1, wherein thepreviously-prepared image is an image prepared by selecting a backgroundimage from a plurality of previously-prepared background images,extracting a region in the background image, and enlarging or downsizingthe image corresponding to the extracted region to an image at apredetermined size.
 4. The training data generating device according toclaim 1, wherein the at least one processor temporarily determines aperson state of a crowd according to the people state controldesignation and the individual person state control designation,determines the temporarily-determined person state as the person stateof the crowd when the temporarily-determined person state meetsconditions for the size of a reference site of a person defined for thepredetermined size and how the reference site is expressed, andrepeatedly makes the temporary determination of the person state of thecrowd when the temporarily-determined person state does not meet theconditions.
 5. The training data generating device according to claim 1,comprising: at least one storage storing the people state controldesignation defined per item and store the presence of a designatedtraining label defined for the item, and wherein the at least onestorage stores the individual person state control designation definedper item and stores the presence of a designated training label definedfor the item, wherein the at least one processor is configured todetermine a person state of a crowd according to the people statecontrol designation stored in the at least one storage and theindividual person state control designation stored in the at least onestorage, and the at least one processor is configured to specify atraining label by reading the people state control designation of anitem defined as having a designated training label from the at least onestorage and reading the individual person state control designation ofan item defined as having a designated training label from the at leastone storage.
 6. The training data generating device according to claim5, wherein the at least one storage stores at least one item as having adesignated training label, and the at least one processor is configuredto read the people state control designation of an item defined ashaving a designated training label from the at least one storage.
 7. Thetraining data generating device according to claim 5, wherein the atleast one storage stores the people state control designation and thepresence of a designated training label per item such as arrangement ofperson, direction of person, and number of persons, and stores thepeople state control designation corresponding to each item in any oneof a first form of designating a specific state, a second form ofdesignating that an arbitrary state may be defined, and a third form ofdesignating that a state may be defined within a defined rule, the atleast one storage stores the individual person state designation and thepresence of a designated training label per item such as shooting angleof person, illumination to person, posture of person, clothes of person,body shape of person, hairstyle of person, and person size whensynthesized with crowd state image, and stores the individual personstate control designation corresponding to each item in any one of thefirst form, the second form and the third form, and the at least oneprocessor is configured to determine a person state of a crowd accordingto the people state control designation stored in the at least onestorage and the individual person state control designation stored inthe at least one storage.
 8. The training data generating deviceaccording to claim 1, wherein the at least one processor is configuredto select a person image matching with the determined person states suchas direction of person, number of persons, shooting angle of person,illumination to person, posture of person, clothes of person, body shapeof person, and hairstyle of person from a group of previously-preparedperson images, crops the region of a person from the selected personimage thereby to generate an image of only the person, and synthesizethe image of only the person with the image at a predetermined sizeaccording to arrangement of person and person size when synthesized withcrowd state image determined as the person states.
 9. The training datagenerating device according to claim 8, wherein the at least oneprocessor sequentially synthesizes from an image of only a personcorresponding to the farthest arrangement position from a camera withthe image at a predetermined size.
 10. The training data generatingdevice according to claim 1, wherein the at least one processortemporarily determines a person state of a crowd as the background in acrowd state image according to the people state control designation andthe individual person state control designation, determines thetemporarily-determined person state as the person state of the crowd asthe background when the temporarily-determined person state meets afirst condition for the size of the reference site of a person definedfor the predetermined size of the crowd state image and how thereference site is expressed, and repeatedly makes the temporarydetermination of the person state of the crowd as the background whenthe temporarily-determined person state does not meet the firstcondition; and the at least one processor temporarily determines aperson state of a crowd as the foreground in a crowd state imageaccording to the people state control designation and the individualperson state control designation, determines the temporarily-determinedperson state as the person state of the crowd as the foreground when thetemporarily-determined person state meets a second condition for thesize of the reference site defined for the predetermined size of thecrowd state image and how the reference site is expressed, andrepeatedly makes the temporary determination of the person state of thecrowd as the foreground when the temporarily-determined person statedoes not meet the second condition.
 11. The training data generatingdevice according to claim 10, wherein the first condition is that thereference site of a person is not within a crowd state image or that thesize of the reference site is much larger or much smaller than the sizeof the reference site of a person defined for the predetermined size,and the second condition is that the reference site of a person iswithin a crowd state image and the size of the reference site is aslarge as the size of the reference site of a person defined for thepredetermined size.